feat(create-pr): Improve the version executed (SHA instead branch)#81
feat(create-pr): Improve the version executed (SHA instead branch)#81alucardzom wants to merge 21 commits intomainfrom
Conversation
7d267f5 to
b3aff48
Compare
There was a problem hiding this comment.
Pull Request Overview
The PR refactors how the GitHub Tools version is passed (using SHA via github.action_ref), strengthens commit-generation scripts by ensuring branches exist and are up to date, and streamlines the platform release script’s branch naming and changelog commit logic.
- Make
github-tools-versioninput optional, defaulting to the caller SHA - Fetch and verify local/remote branches in
generate-rc-commits.mjs - Simplify
get_release_branch_nameand conditionally addcommits.csvin the shell script
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/create-release-pr.yml | Added optional github-tools-version input defaulting to github.action_ref and debug logs |
| .github/scripts/generate-rc-commits.mjs | Inserted git.fetch plus local/remote branch existence checks before commit filtering |
| .github/scripts/create-platform-release-pr.sh | Collapsed release-branch logic, commented old variants, and conditionally stage commits.csv |
Comments suppressed due to low confidence (2)
.github/workflows/create-release-pr.yml:52
- Wrap the expression in quotes (e.g.,
default: '${{ github.action_ref }}') to ensure the YAML parser treats it as a string rather than attempting to interpolate prematurely.
default: ${{ github.action_ref }}
.github/scripts/create-platform-release-pr.sh:231
- This line lacks a leading '+' in the diff and isn’t indented under the
ifblock—ensure it’s only executed when./commits.csvexists to avoid unintended adds.
git add ./commits.csv
Qbandev
left a comment
There was a problem hiding this comment.
@alucardzom LGTM but copilot has in interesting (cosmetic) suggestion.
|
Interesting. At first I thought the linked issue had a simple workaround (setting But supposedly setting |
Adding a comment about why the github.action_ref should be added as input. Co-authored-by: Mark Stacey <markjstacey@gmail.com>
We will treat this in a separate PR with a different objective
| fi | ||
|
|
||
| echo "Changelog PR Ready" | ||
| echo "Changelog PR Ready" No newline at end of file |
There was a problem hiding this comment.
Nit: Presumably this was a mistake? Not super important though
To unify the release method, I’ve tested and dumped the GH action variables at GitHub variable and it’s impossible on a reusable workflow to reuse the SHA used to call it, I’ve tried even testing it, but I can’t.
There is no mention of the Github-tools SHA, the github.action_ref works for a branch name (example) but not for an SHA (example) using it as mentioned in an issue (usage).
There is a few opened cases about this issue at GH pending to be solved:
github.action_repositoryandgithub.action_refare empty inrunfor composite actions actions/runner#2473So in the meantime this is fixed, I would prefer to pass the GitHub-tools-version SHA input until it’s fixed and then this variable could be removed, I prefer to pass a PR changing the SHA instead of letting someone break something at the main branch on Github tools by mistake and promote the change to main, which is currently how it works.